import { Service } from "cl-admin";
import BaseService from "@/service/base";
import qs from "qs";
@Service("rent")
class rent extends BaseService {

  //租金配置-办公室配置列表
  getOfficeList(params) {
    return this.$get('/officeList',{params} )
  }
  //租金配置-门店配置列表
  getRentList(params) {
    return this.$get('/storedormList', {params})
  }
  //租金配置-办公室宿舍列表
  getOfficedormList(params) {
    return this.$get('/officedormList', {params})
  }
  //租金配置-租金列表
  getStoredormList({ size, ...args }) {
    
    let params = {
      ...args,
      size: size
    };
    return this.$get("/rentList", { params }).then(res => {
      console.log(res)
      return {
        list: res.data,
        pagination: {
          ...params,
          size,
          total: res.total
        }
      };
    })
  }
 //租金配置-添加办公室列表
  addOfficeConfig(params) {
    return this.$post('/officeConfig', params)
  }
  //租金配置-门店宿舍列表
  addStoredormConfig(params) {
    return this.$post('/storedormConfig', params)
  }
  //租金配置-办公室宿舍列表
  addOfficedormConfig(params) {
    return this.$post('/officedormConfig', params)
  }
  //租金配置-下载模板配置列表
  templateDownload(params) {
    return this.$post('/templateDownload', params)
  }
 
  //租金配置-门店宿舍删除
  storedormDelete(params){
    return this.$post('/storedormDelete', params)
  }
  //租金配置-办公室删除
  officeDelete(params){
    return this.$post('/officeDelete', params)
  }
  officedormDelete(params){
    return this.$post('/officedormDelete', params)
  }
  //租金配置-办公室修改
  officeEdit(params){
    return this.$post('/officeEdit', params)
  }
  //租金配置-门店宿舍修改
  storedormEdit(params){
    return this.$post('/storedormEdit', params)
  }
  //租金配置-办公室宿舍修改
  officedormEdit(params){
    return this.$post('/officedormEdit', params)
  }
}
export default rent;
